#!/bin/bash
mvn clean install dockerfile:build
# shellcheck disable=SC2046
# shellcheck disable=SC2126
if [ $(docker images | grep /trading/trading_test | wc -l) -gt 0 ]; then
  docker rmi 10.191.2.141:10200/trading/trading_test:1.0-SNAPSHOT
fi
docker tag trading_test:1.0-SNAPSHOT 10.191.2.141:10200/trading/trading_test:1.0-SNAPSHOT
docker push 10.191.2.141:10200/trading/trading_test:1.0-SNAPSHOT